<%--
  Created by IntelliJ IDEA.
  User: chen
  Date: 2020/10/25
  Time: 22:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="BASE" value="${pageContext.request.contextPath}" />
<%--@elvariable id="customer" type="ltd.starriddle.smart4j.chapter2.model.Customer"--%>
<%--@elvariable id="msg" type="java.lang.String"--%>
<html>
<head>
    <title>客户管理</title>
</head>
<body>

<h1>删除客户</h1>

<p><a href="${BASE}/customer">返回</a> </p>

<form action="customer_delete" method="post">
    <input type="text" name="id" value="${customer.id}" hidden="hidden">
    <table>
        <tr>
            <th>客户 ID</th>
            <td>${customer.id}</td>
        </tr>
        <tr>
            <th>客户名称</th>
            <td>${customer.name}</td>
        </tr>
        <tr>
            <th>联系人</th>
            <td>${customer.contact}</td>
        </tr>
        <tr>
            <th>电话号码</th>
            <td>${customer.phone}</td>
        </tr>
        <tr>
            <th>邮箱地址</th>
            <td>${customer.email}</td>
        </tr>
        <tr>
            <th>备注</th>
            <td>${customer.remark}</td>
        </tr>
        <c:if test="${msg == null}">
            <tr>
                <td colspan="2">
                    <input type="submit" value="删除">
                </td>
            </tr>
        </c:if>
        <c:if test="${msg != null}">
            <tr>
                <td colspan="2">${msg}</td>
            </tr>
        </c:if>
    </table>
</form>

</body>
</html>
